﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace ScoringClient
{
    class ResourceProvider
    {
        internal static ResourceDictionary LoadResource(string path)
        {
            try
            {
                return (ResourceDictionary)Application.LoadComponent(new Uri(path, UriKind.Relative));
            }
            catch (Exception ex)
            {
                LoggerProvider.Info(string.Format("资源文件{0}发生异常，{1}", path, ex.Message), "ResourceProvider", "LoadResource");
                return null;
            }
        }
    }
}
